package com.market.controller;

import com.market.common.vo.ResponseCode;
import com.market.common.vo.ResponseResult;
import com.market.entity.MallSales;
import com.market.service.MallSalesService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/mallSales")
public class MallSalesController {
    @Resource
    MallSalesService mallSalesService;

    @GetMapping("/storeSales")
    public ResponseResult<List<MallSales>> storeSales() {
        List<MallSales> mallSales = mallSalesService.storeSales();
        return ResponseResult.success(ResponseCode.SUCCESS, mallSales);
    }
}
